home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / quicktime / all macintosh / quicktime for java / imagecompositing / readme.txt < prev   
Encoding:
Text File  |  2000-09-28  |  4.0 KB  |  62 lines

  1. =============================================================================
  2. QuickTime for Java SDK                              Updated: 30 November 1998
  3.  
  4. Read Me Notes to "Image Compositing" Demo and Sample Code
  5.  
  6. =============================================================================
  7. This demo program shows how to composit a presentation out of disparate media sources, applying compositing effects such as blend and transparency. Recording a movie from the activities of the Compositor is also shown.
  8.  
  9. =============================================================================
  10. The minimum runtime requirements for this Sample Code are:
  11.  
  12. - Common
  13.     - Sun Compliant Java Runtime Environment 1.1
  14.     - QuickTime 3 
  15.     - QTJava.zip
  16.  
  17. - MacOS:
  18.     - System 8 or later
  19.     - Macintosh Runtime for Java (MRJ) 2.1
  20.  
  21. - Windows 95, 98, or NT::
  22.     - JRE/JDK from Sun Microsystems, Inc. recommended
  23.  
  24. =============================================================================
  25. Media requirements for this Sample Code are found in the media directory of the QTJava SDK:
  26.  
  27. (1) ShipX.pct files (where X is a number indicative of a frame order)
  28. (2) The house.jpg picture file
  29. (3) The jumps.mov movie
  30.  
  31. =============================================================================
  32. Notes & Comments
  33.  
  34. Various different types of objects are added as members to the top level compositor:
  35. (1) A Compositor made up of cycling image based Sprites (see Bouncing Sprites for explanation)
  36. (2) A Movie which is added through the use of the MoviePresenter class. A blend effect is applied to this member
  37. (3) An image which has a blend effect also applied to it (ImagePresenter)
  38. (4) QTImageDrawer object. This object takes any drawing that is done using Java drawing APIs and draws the resultant image in the QT owned space. It has a transparent graphics mode applied to it.
  39.  
  40. The paint method of the QTImageDrawer Paintable object returns an array of rectangles that tell the drawer which areas of its drawing area were drawn. This optimises the amount of copying and can greatly increase performance when composited. The QTImageDrawer is presented using the Notifier class JavaTextDrawer which captures a single rendering of the image drawer and then presents this in the context of the Compositor. Whenever the user clicks the Text Colour button a new image drawer is done and the text colour is randomly generated. We only need to keep the image drawer around to do this single pass - once done we can throw it away and we notify the NotifyListener that the image data has changed.
  41.  
  42. Controllers are attached to the Compositor in the same way that they are for the Group Drawing demo - dragging and layering responders.
  43.  
  44. The sample code also shows the usage of the RecordMovie class - the user can enable recording, select the number of frames to record. As the compression of each frame can take longer than just the composit cycle the user can adjust the rate of the Compositor's playback. This does not effect the ultimate recorded output - which is recorded to playback at ten frame a second regardless of the time it takes to record each frame.
  45.  
  46. The sample also prints out some profiling information about the time it takes to composit the set frames per second and the time it took to actually composit the last frame.
  47.  
  48. =============================================================================
  49. General Comments
  50.  
  51. - QTSession.open and close:
  52.  
  53. A QTSession.open will perform a gestalt check to ensure that QuickTime is present and is initialized. This is a required call before any QuickTime Java classes can be used.
  54.  
  55. When the user closes the window the program will quit, first calling QTSession.close to terminate QuickTime. It is necessary for programs to call QTSession.close if they have previously called QTSession.open in order to shut down QuickTime properly.
  56.  
  57.  
  58. =============================================================================
  59.  
  60. QuickTime and QuickTime for Java are trademarks of Apple Computer, Inc.
  61. (c) 1998 Apple Computer Inc. All rights reserved.
  62.